class Config:
    # 窗口设置
    WINDOW_WIDTH = 1200
    WINDOW_HEIGHT = 800
    GRID_SIZE = 80  # 网格大小（单位：像素）
    CELL_SIZE = 10  # 细胞大小（单位：像素）
    
    # 颜色设置
    BACKGROUND_COLOR = (40, 40, 40)  # 更深的背景色
    GRID_COLOR = (80, 80, 80)  # 更柔和的网格线颜色
    CELL_COLOR = (0, 255, 128)  # 更鲜艳的细胞颜色
    BUTTON_COLOR = (45, 45, 45)  # 更深的按钮颜色
    BUTTON_HOVER_COLOR = (70, 70, 70)  # 更柔和的悬停颜色
    TEXT_COLOR = (220, 220, 220)  # 更柔和的文本颜色
    
    # 游戏设置
    DEFAULT_SPEED = 10  # 默认每秒更新次数
    MIN_SPEED = 1
    MAX_SPEED = 60
    
    # 网格大小设置
    MIN_GRID_SIZE = 10
    MAX_GRID_SIZE = 500
    DEFAULT_GRID_SIZE = 80
    
    # UI设置
    BUTTON_WIDTH = 100  # 减小按钮宽度
    BUTTON_HEIGHT = 35  # 减小按钮高度
    BUTTON_MARGIN = 15  # 增加按钮间距
    PANEL_WIDTH = 240  # 增加面板宽度以适应双列布局
    SLIDER_HEIGHT = 20  # 滑动条高度
    DROPDOWN_HEIGHT = 30  # 下拉菜单高度

    # 网格设置
    GRID_COLS = 80  # 网格列数
    GRID_ROWS = 60  # 网格行数

    # 字体设置
    FONT_SIZE = 16
    TITLE_FONT_SIZE = 24  # 增大标题字体
    WINDOW_TITLE = "生命游戏"
    DEFAULT_FONTS = ["微软雅黑", "SimHei", "黑体", "Arial"]  # 备选字体列表
    TITLE_BOLD = True  # 标题是否加粗

    # 按钮文本
    BTN_START = "开始"
    BTN_PAUSE = "暂停"
    BTN_CLEAR = "清除"
    BTN_RANDOM = "随机"
    BTN_SAVE = "保存"
    BTN_LOAD = "加载"
    BTN_STEP = "单步"

    # 数据显示文本
    TEXT_GENERATION = "代数: {}"
    TEXT_ALIVE_CELLS = "活细胞: {}"
    TEXT_SPEED = "速度: {} 步/秒"
    TEXT_STATUS = "状态: {}"
    TEXT_GRID_SIZE = "网格大小: {}x{}"
    
    # 预设图案
    PATTERNS = {
        "滑翔机": [
            [0, 1, 0],
            [0, 0, 1],
            [1, 1, 1]
        ],
        "脉冲星": [
            [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0],
            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0],
            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1],
            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0]
        ],
        "飞船": [
            [0, 1, 1, 1, 1],
            [1, 0, 0, 0, 1],
            [0, 0, 0, 0, 1],
            [1, 0, 0, 1, 0]
        ]
    }